﻿using Onlyle.Business;
using Onlyle.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Onlyle_Metro.Controllers
{
    public class GaoXiaoController : Controller
    {
        //
        // GET: /GaiXiao/
        //string publicPage = "~/Views/Shared/_gaoxiaoPage.cshtml";
        GaoXiao_ArticleBLL articlebll = new GaoXiao_ArticleBLL();
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult neihan()
        {
            return CreateGaoXiaoPage("内涵");
        }

        public ActionResult pagelistdetail()
        {
            string pageNum = (Request.QueryString["p"] ?? "").ToString();
            List<E_GaoXiao_Article> ArticleList = articlebll.Select(pageNum, "内涵");


            return View(ArticleList);
        }

        ActionResult CreateGaoXiaoPage(string type)
        {
            string pageNum = (Request.QueryString["p"] ?? "").ToString();
            List<E_GaoXiao_Article> ArticleList = articlebll.Select(pageNum, type);
            ViewBag.Type = "neihan";
            return View(ArticleList);
        }

    }
}
